import request from '../utils/request';
import { getToken } from '../utils/auth';

/* 推送信息 */

    /* 列表 */
    export function pusherInfoList (data) {
        return request({
            url: '/pusher-client/info/list',
            method: 'get',
            params:data
        })
    }
    /* 新增 */
    export function pusherInfoAdd (data) {
        return request({
            url: '/pusher-client/info/add',
            method: 'POST',
            data
        })
    }
    /* 编辑 */
    export function pusherInfoEdit (data) {
        return request({
            url: '/pusher-client/info/update/'+data.id,
            method: 'PUT',
            data
        })
    }
    /* 删除 */
    export function pusherInfoDel (data) {
        return request({
            url: '/pusher-client/info/delete/'+data.id,
            method: 'delete',
           
        })
    }

/* 推送目标 */

    /* 列表 */
    export function pusherTargetList (data) {
        return request({
            url: '/pusher-client/anchor/list',
            method: 'get',
            params:data
        })
    }
    /* 新增 */
    export function pusherTargetAdd (data) {
        return request({
            url: '/pusher-client/anchor/add',
            method: 'POST',
            data
        })
    }
    /* 编辑 */
    export function pusherTargetEdit (data) {
        return request({
            url: '/pusher-client/anchor/update/'+data.id,
            method: 'PUT',
            data
        })
    }
    /* 删除 */
    export function pusherTargetDel (data) {
        return request({
            url: '/pusher-client/anchor/delete/'+data.id,
            method: 'delete',
           
        })
    }

    /* 采集任务 */

    /* 列表 */
    export function pusherTaskList (data) {
        return request({
            url: '/pusher-client/task/list',
            method: 'get',
            params:data
        })
    }
    /* 新增 */
    export function pusherTaskAdd (data) {
        return request({
            url: '/pusher-client/task/add',
            method: 'POST',
            data
        })
    }
    /* 编辑 */
    export function pusherTaskEdit (data) {
        return request({
            url: '/pusher-client/task/update/'+data.id,
            method: 'PUT',
            data
        })
    }
    /* 删除 */
    export function pusherTaskDel (data) {
        return request({
            url: '/pusher-client/task/delete/'+data.id,
            method: 'delete',
           
        })
    }

     /* 审批 */
     export function pusherCheck (data,stutas) {
        return request({
            url: '/pusher-client/task/updateStatus/'+data.id+"/"+stutas,
            method: 'PUT',
        })
    }
  /* 地区 */
  export function getRegion (data,stutas) {
    return request({
        url: '/pusher-client/task/region',
        method: 'get',
    })
}
    
  /* 详情头数据 */
  export function headerList (data) {
    return request({
        url: '/pusher-client/task/'+data.id,
        method: 'get',
    
    })
}
/* 推送详情 */
export function InfoList (data,id) {
    return request({
        url: '/pusher-client/task/pushInfo/'+id,
        method: 'get',
        params:data
    
    })
}
/* 直播间详情 */
export function zbjList (data,id) {
    return request({
        url: '/pusher-client/task/monitorInfo/'+id,
        method: 'get',
        params:data
    
    })
}
/*  通知获取目标作品URL集 */
export function opusUrlList (data) {
    return request({
        url: '/pusher-client/anchor/opusUrlList',
        method: 'get',
        params:data
    
    })
}
